package com.exam.project.business.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.exam.framework.aspectj.lang.annotation.Excel;
import com.exam.framework.web.domain.BaseEntity;

/**
 * 答案对象 user_answer
 * 
 * @author qiuwenbing
 * @date 2025-04-03
 */
public class UserAnswer extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** 关联的学生考试记录id */
    @Excel(name = "关联的学生考试记录id")
    private Long userId;

    private Long examId;

    /** 关联的题目id */
    @Excel(name = "关联的题目id")
    private Long questionId;

    /** 学生的答题内容 */
    @Excel(name = "学生的答题内容")
    private String studentAnswerContent;

    /** 学生答题是否正确，null表示未判题，true表示正确，false表示错误 */
    @Excel(name = "学生答题是否正确，null表示未判题，true表示正确，false表示错误")
    private Integer isCorrect;

    /** 该题得分 */
    @Excel(name = "该题得分")
    private Long score;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getExamId() {
        return examId;
    }

    public void setExamId(Long examId) {
        this.examId = examId;
    }

    public void setQuestionId(Long questionId)
    {
        this.questionId = questionId;
    }

    public Long getQuestionId() 
    {
        return questionId;
    }
    public void setStudentAnswerContent(String studentAnswerContent) 
    {
        this.studentAnswerContent = studentAnswerContent;
    }

    public String getStudentAnswerContent() 
    {
        return studentAnswerContent;
    }
    public void setIsCorrect(Integer isCorrect) 
    {
        this.isCorrect = isCorrect;
    }

    public Integer getIsCorrect() 
    {
        return isCorrect;
    }
    public void setScore(Long score) 
    {
        this.score = score;
    }

    public Long getScore() 
    {
        return score;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("questionId", getQuestionId())
            .append("studentAnswerContent", getStudentAnswerContent())
            .append("isCorrect", getIsCorrect())
            .append("score", getScore())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
